package cn.shop.alibaba.feign;

import cn.shop.alibaba.beans.Product;
import cn.shop.alibaba.resp.Result;
import org.springframework.stereotype.Component;

@Component
public class ProductServiceFeignFallBack implements ProductServiceFeign{
    @Override
    public Product getProductById(Long pid) {
        Product product = new Product();
        product.setId(-1L);
        return product;
    }

    @Override
    public Result<Integer> update_count(Long pid, Integer count) {
        Result<Integer> result = new Result<>();
        result.setCode(1001);
        result.setCodeMsg("触发了容错逻辑");
        return result;
    }
}
